//package xcmg.device.service.redis;
//
//import org.apache.commons.collections.CollectionUtils;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.data.redis.core.StringRedisTemplate;
//import org.springframework.stereotype.Service;
//import xcmg.device.infra.ErrorCode;
//import xcmg.device.infra.JsonUtil;
//import xcmg.device.infra.enums.CacheEnum;
//import yb.ecp.fast.infra.infra.log.LogHelper;
//
//import java.util.Set;
//
///**
// * @Author:WangKe
// * @Description:
// * @Date：Created in 13:53 2019/1/30 0030
// */
//@Service
//public class CacheService {
//
//    @Autowired
//    private StringRedisTemplate stringRedisTemplate;
//
//    public ErrorCode removeByKey(String orgId, CacheEnum cacheEnum) {
//        Set<String> keys = stringRedisTemplate.keys(cacheEnum.keyPrefix(orgId));
//        LogHelper.monitor("===删除缓存===" + cacheEnum + "===" + JsonUtil.objectToString(keys));
//        if (CollectionUtils.isNotEmpty(keys)) {
//            stringRedisTemplate.delete(keys);
//        }
//        return ErrorCode.Success;
//    }
//}
